package com.renjun.smweb.service.RoleService;

import com.alibaba.fastjson.JSONObject;
import com.renjun.smweb.exceptions.DataNotFoundException;

import java.sql.SQLException;
import java.util.Map;

/**
 * Created by huamin on 2017/2/21.
 * 角色管理M2接口
 */
public interface RoleService {

    /**
     * 角色列表M2-1
     * @param params
     * @return
     * @throws SQLException
     */
    JSONObject queryRoleList(Map<String, Object> params)throws SQLException;

    /**
     * 新增角色M2-2
     * @param params
     * @return
     * @throws SQLException
     */
    JSONObject addNewRole(Map<String, Object> params)throws SQLException;

    /**
     * 修改角色M2-3
     * @param params
     * @return
     * @throws SQLException
     */
    JSONObject updateRole(Map<String, Object> params)throws SQLException;

    /**
     * 修改角色M2-4
     * @param params
     * @return
     * @throws SQLException
     */
    JSONObject recoverOrCancelRole(Map<String, Object> params)throws SQLException;


    /**
     * 角色查看M2-5
     * @param params｛用户ID：roleid｝
     * @return
     * @throws SQLException
     * @throws DataNotFoundException
     */
    JSONObject queryRoleById(Map<String, Object> params)throws SQLException;

}
